<?php
	/**
	* @package ParkFind
	* @desc This is the register receipt page. This is tells user whether registration was successfully submitted or not.
	*/
	/**
	* @desc This include file will load the directory settings for the Smarty Templates
	*/	
	require 'includes/smarty.inc';
	$smarty->assign('title', "Register");
	$smarty->assign('user_id', $_SESSION["user_id"]);	
	$smarty->assign('last', $_SESSION["lastviewed"]);	
	$smarty->assign('firstname', $_SESSION["firstname"]);
	$smarty->assign('role', $_SESSION["role"]);
	$smarty->assign('top5', $_SESSION["top5"]);	
	$smarty->display('header.tpl');
	
	$result = $_GET["result"];
	$first = $_GET["first"];
	$last = $_GET["last"];
	$email = $_GET["email"];
	
	$smarty->assign('result', $result);
	
	if ($result == "success")
	{
		$message = "Successfully register user<br/><br/>" .
		"First name: " . $first . "<br/>" .
		"Surname: " . $last . "<br/>" .
		"Email: " . $email . "<br/>";
	}
	else if ($result == "exist")
		$message = "Failed to register user<br/><br/>User already exists";
	else
		$message = "Some query failed";	
	
	$smarty->assign('message', $message);	
	$smarty->display('regreceipt.tpl');
	$smarty->display('footer.tpl');
?>
